package edu.dayu.job;

import edu.dayu.base.BaseJob;
import edu.dayu.service.QrtzCronTriggersService;
import edu.dayu.util.SpringBeanUtils;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

import java.util.Date;
import java.util.concurrent.ExecutorService;

@Slf4j
public class TestJob implements BaseJob {
    @Autowired
    private ExecutorService executorService;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        executorService.execute(()->{
            log.info(context.getJobDetail().getJobClass().getName()+" 执行时间"+new Date());
        });
    }
}
